package com.baishui.gateway;

import com.baishui.gateway.server.VertxServer;
import io.vertx.core.Vertx;
import io.vertx.core.VertxOptions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class GateWayServer {

    @Autowired
    private VertxServer vertxServer;

    public void deployVerticle() {

        Vertx vertx = Vertx.vertx(
                new VertxOptions().setWorkerPoolSize(10)
                        .setBlockedThreadCheckInterval(9999L)
                        .setMaxEventLoopExecuteTime(Long.MAX_VALUE));

        vertx.deployVerticle(vertxServer);
    }

}
